# -*- coding:utf-8 -*-
# @Time: 2020/8/24 15:36
# @Author: liupengfei
# @File: urls.py
from django.urls import path, include
from rest_framework_jwt.views import refresh_jwt_token, verify_jwt_token
from rest_framework.routers import SimpleRouter
from .views import MemberSendCodeView, MemberLoginView, MemberHouseViewSet, GetWXCodeView, MeCollectionsView, \
    RegisterView
from rest_framework_jwt.views import refresh_jwt_token, verify_jwt_token

urlpatterns = [
    path('token/obtain/', MemberLoginView.as_view()),  # 验证码注册登录
    path('send/vcode/', MemberSendCodeView.as_view()),  # 获取验证码
    path('get_wx_code/', GetWXCodeView.as_view()),  # 获取验证码
    path('collections/', MeCollectionsView.as_view()),  # 我的收藏
    path('username_register/', RegisterView.as_view()),  # 注册
    path('token/refresh/', refresh_jwt_token),
    path('token/verify/', verify_jwt_token),
    # path('login/', MeCollectionsView.as_view()),  # 注册

    path('coupons/', include('apps.member.member_coupons.urls')),  # 优惠卷
    path('article/', include('apps.member.article.urls')),  # 文章
    path('comment/', include('apps.member.comments.urls')),  # 评论
    path('worker/', include('apps.member.worker.urls')),  # 工人
    path('product/', include('apps.member.product.urls')),  # 装修大全
    path('project_case/', include('apps.member.project_case.urls')),  # 案例
    path('adorn_process/', include('apps.member.adorn_process.urls')),  # 装修流程
    path('adorn_pedia/', include('apps.member.adorn_pedia.urls')),  # 装修大全
    path('adorn_service/', include('apps.member.adorn_service.urls')),  # 预约服务
    path('circle/', include('apps.member.circle.urls'))
]

router = SimpleRouter()
router.register('house', MemberHouseViewSet)  # 我的房子信息
urlpatterns += router.urls
